package com.example.prototypedemo.entityu;

/**
 * @author godShan
 * @Description:
 * @date 2019/5/6 14:19
 */
public class Test {

    public static void main(String[] args) {
        try {
            Man man = new Man();
            Man deepMan = (Man) man.clone();
            System.out.println("深度克隆 ： " + (man.girl == deepMan.girl));
        } catch (Exception e) {
            e.printStackTrace();
        }
        Man man = new Man();
        Man shallowMan = (Man) man.shallowClone(man);
        System.out.println("浅克隆 ： " + (man.girl == shallowMan.girl));

    }

}
